//
//  TravelTourOneTableCell.m
//  ToWhere
//
//  Created by dllo on 15/11/18.
//  Copyright © 2015年 www.TE.com. All rights reserved.
//

#import "TravelTourOneTableCell.h"
#import "TravelTopicDetailsOneTableViewCell.h"


@interface TravelTourOneTableCell ()

@property (nonatomic, retain) UILabel *labelN;;

@end



@implementation TravelTourOneTableCell

-(void)dealloc
{
    [_labelN release];
    [_str release];
    [super dealloc];
}

-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    
    self =[super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        
        [self createView ];
        
    }
    return self;
}

-(void)createView
{
    self.labelN = [[UILabel alloc]init];
    self.labelN.font = [UIFont systemFontOfSize:14*kWidth];
    
    self.labelN.numberOfLines = 0;
    
    [self addSubview:self.labelN];
    [_labelN release];
    
}

-(void)layoutSubviews
{
    [super layoutSubviews];
    self.labelN.frame = CGRectMake(5 *kWidth,10 *kHeight, self.frame.size.width -10 *kWidth, [TravelTopicDetailsOneTableViewCell heightOfLabel:self.str andTextFont:[UIFont systemFontOfSize:14*kWidth] andTextWidth:self.frame.size.width - 10 *kWidth]);
    
}
-(void)setStr:(NSString *)str
{
    if (_str != str) {
        [_str release];
        _str = [str retain];
    }
    self.labelN.text = str;
   
}



/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end
